import stackdemo.MyStack;

import java.util.Stack;

public class Test {
    public static void main(String[] args) {
        MyStack stack = new MyStack();
        //push 添加数组
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.push(4);

        //pop弹出数
        int ret1 = stack.pop();
        System.out.println(ret1);
        //peek获取一个数但不删除
        int ret2 = stack.peek();
        System.out.println(ret2);
        //判断是否为空
       System.out.println(stack.isEmpty());
    }
}
